package h0728;

import java.util.*;

/**
  * @description 小区小朋友的数量
  * @author 不知名帅哥
  * @date 2024/7/28 21:55
  * @version 1.0
*/
public class TheNumOfKids {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int[] array = Arrays.stream(sc.nextLine().split(" ")).mapToInt(Integer::parseInt).toArray();
        System.out.println(getRes(array));
    }

    private static int getRes(int[] array) {
        Map<Integer,Integer> map=new HashMap<>();
        for (int a : array) {
            map.put(a+1,map.getOrDefault(a+1,0)+1);
        }
        int ans=0;
        for (Map.Entry<Integer, Integer> entry : map.entrySet()) {
            Integer key = entry.getKey();
            Integer value = entry.getValue();
            ans+=key*((key+value-1)/key); //向上取整
        }
        return ans;
    }
}
